﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace IFRS.Web
{
    public class SessionManager
    {
        public SessionManager()
        {
            //
            // TODO: Add constructor logic here
            //
        }

        public static int IFRS_ROLE_ID
        {
            get {
                if (HttpContext.Current.Session["IFRS_ROLE_ID"] != null)
                    return Convert.ToInt32(HttpContext.Current.Session["IFRS_ROLE_ID"]);
                else
                    return -1;
            }
            set { HttpContext.Current.Session["IFRS_ROLE_ID"] = value; }
        }
        public static string IFRS_EMPLOYEE_ID
        {
            get { return Convert.ToString(HttpContext.Current.Session["IFRS_EMPLOYEE_ID"]); }
            set { HttpContext.Current.Session["IFRS_EMPLOYEE_ID"] = value; }
        }
        public static string IFRS_EMPLOYEE_NAME
        {
            get { return Convert.ToString(HttpContext.Current.Session["IFRS_EMPLOYEE_NAME"]); }
            set { HttpContext.Current.Session["IFRS_EMPLOYEE_NAME"] = value; }
        }
        public static string IFRS_EMPLOYEE_DES
        {
            get { return Convert.ToString(HttpContext.Current.Session["IFRS_EMPLOYEE_DES"]); }
            set { HttpContext.Current.Session["IFRS_EMPLOYEE_DES"] = value; }
        }
        public static string IFRS_COST_CENTER
        {
            get { return Convert.ToString(HttpContext.Current.Session["IFRS_COST_CENTER"]); }
            set { HttpContext.Current.Session["IFRS_COST_CENTER"] = value; }
        }
        public static string IFRS_BRANCH
        {
            get { return Convert.ToString(HttpContext.Current.Session["IFRS_BRANCH"]); }
            set { HttpContext.Current.Session["IFRS_BRANCH"] = value; }
        }
        public static bool IFRS_ADD
        {
            get { return Convert.ToBoolean(HttpContext.Current.Session["IFRS_ADD"]); }
            set { HttpContext.Current.Session["IFRS_ADD"] = value; }
        }
        public static bool IFRS_EDIT
        {
            get { return Convert.ToBoolean(HttpContext.Current.Session["IFRS_EDIT"]); }
            set { HttpContext.Current.Session["IFRS_EDIT"] = value; }
        }
        public static bool IFRS_DELETE
        {
            get { return Convert.ToBoolean(HttpContext.Current.Session["IFRS_DELETE"]); }
            set { HttpContext.Current.Session["IFRS_DELETE"] = value; }
        }
        public static bool IFRS_VIEW
        {
            get { return Convert.ToBoolean(HttpContext.Current.Session["IFRS_VIEW"]); }
            set { HttpContext.Current.Session["IFRS_VIEW"] = value; }
        }
        public static string IFRS_PROGRAM_ID
        {
            get { return Convert.ToString(HttpContext.Current.Session["IFRS_PROGRAM_ID"]); }
            set { HttpContext.Current.Session["IFRS_PROGRAM_ID"] = value; }
        }
        public static Boolean IFRS_ALLBRANCH
        {
            get { return Convert.ToBoolean(HttpContext.Current.Session["IFRS_ALLBRANCH"]); }
            set { HttpContext.Current.Session["IFRS_ALLBRANCH"] = value; }
        }
    }
}